-
Notifications
You must be signed in to change notification settings - Fork 34
feat(fsm): add support to announce Windows processes. #833
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
CagriYonca
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
GSVarsha
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me
This reverts commit d53fdd8. Signed-off-by: Paulo Vital <paulo.vital@ibm.com>
Unit tests for TheMachine cmdline-related methods in fsm.py. This test module provides comprehensive coverage for the command line retrieval functions that work across different platforms (Windows, Linux, Unix). Tested functions: - _get_cmdline_windows(): Retrieves command line on Windows using ctypes - _get_cmdline_linux_proc(): Retrieves command line from /proc/self/cmdline - _get_cmdline_unix_ps(): Retrieves command line using ps command - _get_cmdline_unix(): Dispatches to appropriate Unix method - _get_cmdline(): Main entry point with platform detection and error handling Signed-off-by: Paulo Vital <paulo.vital@ibm.com>
1379596 to
d368a01
Compare
|
CagriYonca
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!



This PR reverts the commit d53fdd8, by reapplying the commit 1da36f4.
The original commit adds a cross-platform process announcement to Instana Host Agents.
The implementation gracefully handles platform differences, ensuring consistent process information on both Unix and Windows environments:
_get_cmdline()function to return the command line of the current monitored process independently of the running platform._get_cmdline_windows()function to return the command line on Windows machines._get_cmdline_unix()that returns the command line in Unix machines. It decides how to collect the information by running either the_get_cmdline_linux_proc()or the_get_cmdline_unix_ps().